import request from '@/utils/request'

// 获取运营需求列表
export function getOperationalInfo(query) {
  return request({
    url: '/operationalApi/getOperationalInfo',
    method: 'get',
    params: query
  })
}
export function getOperationalInfo2(id) {
  return request({
    url: '/operationalApi/'+id,
    method: 'get'
  })
}
// 运营需求详情信息获取
export function getOperationalDetail(query) {
  return request({
    url: '/operationalApi/getOperationalDetail',
    method: 'get',
    params: query
  })
}

// 预估量/方案启用策略值获取值获取
export function getStrategyValue(query) {
  return request({
    url: '/operationalApi/getStrategyValue',
    method: 'get',
    params: query
  })
}

// 人员配置以及超限策略获取
export function getSchemeConfigAndStrategy(id) {
  return request({
    url: 'operationalApi/getSchemeConfigAndStrategy/'+id,
    method: 'get'
  })
}

// •	审核状态更新
export function updateAuditInfo(data) {
  return request({
    url: '/operationalApi/updateAuditInfo',
    method: 'post',
    data: data
  })
}

// •	运营需求单新增
export function addOperational(data) {
  return request({
    url: '/operationalApi/addOperational',
    method: 'post',
    data: data
  })
}

// •	运营需求单编辑
export function updateOperationalInfo(data) {
  return request({
    url: '/operationalApi/updateOperationalInfo',
    method: 'post',
    data: data
  })
}

// •	运营需求单删除
export function delOperationalInfo(data) {
  return request({
    url: '/operationalApi/delOperationalInfo',
    method: 'post',
    data: data
  })
}

//提交审核
export function submitAudit(data) {
  return request({
    url: '/operationalWorkFlowApi/startOperationalWorkFlow',
    method: 'post',
    data: data
  })
}

//审核撤销
export function delAudit(data) {
  return request({
    url: '/task/delProcessInstance',
    method: 'post',
    data: data
  })
}

//更新用工需求预测需求人数
export function submitDemandNumberForm(data) {
  return request({
    url: '/operationalApi/updateDemandNumber',
    method: 'post',
    data: data
  })
}
